import time
import controller
import button

def keyboard_input(string):
    '''
    :param string:你想要发送的信息
    :return: None
    '''
    keyvoard = key_cl() #开始控制键盘
    keyvoard.type(string)#键盘输入string

def mouse_click():#点击发送消息
    mouse = Controller()#开始控制鼠标
    mouse.press(Button.left)#按住控制左键
    mouse.release(Button.left)#松开鼠标左键

def main(number,string):#参数分别表示你要发多少量信息数
    time.sleep(5) #此时暂停5s方便你打开聊天窗并把鼠标
    for i in range(number):#用循环来控制你发多少条信息
        keyboard_input(string * str(i))
        mouse_click()
        time.sleep(0.1)

if __name__ == '__main__':
    main(str,'ss')